# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-property
_pkgname=property
pkgver=2.6.2
pkgrel=3
pkgdesc='A python module to read a property file.'
arch=('any')
url='https://pypi.org/project/property/#files'
license=('custom:unknown')
makedepends=('python-pip' 'python-build' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('0eed7208a60f7c76ca412e7582584f99566b597e9dfe2ef1245a30e3f7f401c7fc42ecd8b0d85e2033c0b4172de30a20b9f03e37aa7e87d32ee95951489cc82a')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

